home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1997 January: Mac OS SDK / Dev.CD Jan 97 SDK2.toast / Development Kits (Disc 2) / OpenDoc Development Framework / ODF-Interest Archive / August 96 / Re Japanese Font Menu < prev    next >
Encoding:
Internet Message Format  |  1996-08-19  |  1.3 KB  |  [TEXT/ttxt]

  1. Subject:     Re: Japanese Font Menu
  2. Sent:        8/19/96 11:30 AM
  3. Received:    8/19/96 11:41 AM
  4. From:        Mary Boetcher, boetche1@apple.com
  5. Reply-To:    ODF Interest, ODF-Interest@CILabs.ORG
  6. To:          OpenDoc Development Framework Discussion List, ODF-Interest@CILabs.
  7.  
  8. >I tried to make 'Font'('Typeface') menu.
  9. >Below is a way that you taught me.
  10. >
  11. >But when fontname is Japanese, it does not work well.
  12. >Displaied menu chars are changed to English Script.
  13. >
  14. >Tell me how to make Japanese 'Font' menu.
  15. >
  16. >
  17. >Best Regards.
  18. >
  19. >void AddFontsToMenu(Environment* ev, FW_CPullDownMenu* menu)
  20. >{
  21. >        short count = 0;
  22. >        FW_CFontIterator fontIter;
  23. >        FW_CString fontName;
  24. >        ODCommandID commandID = cFirstFontCommand;
  25. >        for (fontName = fontIter.First(); fontIter.IsNotComplete();
  26. >fontName = fontIter.Next())
  27. >        {
  28. >                menu->AppendTextItem(ev, fontName, commandID+count);
  29. >                count++;
  30. >        }
  31. >        gFontCount = count;
  32. >}
  33.  
  34. I don't know why this code doesn't work. The fontName passed to 
  35. AppendTextItem should have its locale.fScriptCode = smJapanese. 
  36. Eventually fontName is passed to FW_CTextItem::PrivInitTextItem. On a 
  37. Japanese System does a Japanese menu item need to have a script code in 
  38. the item icon field?
  39.  
  40. Mary Boetcher
  41. ODF Person
  42.